package com.example.dml.observer_pattern.event;

/**
 * @Authors：gaoyang
 * @CreateTime：2021/11/2 23:25
 * @Description：todo
 */
public class Mouse extends EventListener{

    public void click(){
        System.out.println("click");
        this.trigger(MouseEventType.ON_CLICK);
    }

    public void dclick(){
        System.out.println("dclick");
        this.trigger(MouseEventType.ON_DOUBLE_CLICK);
    }

    public void up(){
        System.out.println("up");
        this.trigger(MouseEventType.ON_UP);
    }

    public void down(){
        System.out.println("down");
        this.trigger(MouseEventType.ON_DOWN);
    }

    public void move(){
        System.out.println("move");
        this.trigger(MouseEventType.ON_MOVE);
    }

    public void wheel(){
        System.out.println("wheel");
        this.trigger(MouseEventType.ON_WHEEL);
    }

    public void over(){
        System.out.println("over");
        this.trigger(MouseEventType.ON_OVER);
    }

    public void blur(){
        System.out.println("blur");
        this.trigger(MouseEventType.ON_BLUR);
    }

    public void focus(){
        System.out.println("focus");
        this.trigger(MouseEventType.ON_FOCUS);
    }
}
